﻿using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("Hosts")]
    public class Host : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [Required(AllowEmptyStrings = false)]
        [StringLength(128)]
        public string HostName { get; set; }

        [Required]
        [StringLength(32)]
        public string IP { get; set; }

        [Required]
        [StringLength(32)]
        public string Mac { get; set; }

        [References(typeof(Task))]
        public long TaskId { get; set; }

       
        [Default(typeof(int),"0")]
        public int HostToken { get; set; }
    }
}
